/** 
 * Project Name:sys-portal-Extjs 
 * File Name:MainViewModel.js 
 * Package Name: 
 * Author : 吴Yuan|小森森
 * Date:2018年4月13日下午4:33:53 
 * Copyright (c) 2018, 15909910367@163.com All Rights Reserved. 
 * 
 */
Ext.define('Jason.view.protal.module.systemManager.right.organize.MainViewModel', {
    extend: 'Ext.app.ViewModel',
    alias: 'viewmodel.organize_MainViewModel',
    stores: {
        leftMenuTreeStore: {
            type: 'rightOrganizeStoreByCommonTree'
        },
        centerViewStore: {
            type: 'rightOrganizeStore'
        },
        areaTreeStore:{
            type : 'areaTreeStore'
        },
        deptComboTreeStore: {
            xtype: 'tree',
            fields: [
                { name: 'id', mapping: 'id' },
                { name: 'text', mapping: 'deptname' },
                'children',
                'leaf'
            ],
            autoLoad: true,
            rootVisible: true,
            proxy: {
                type: 'ajax',
                url: reqUrl.sys.organize.leftMenu,
                rootProperty: function (data) {
                    return data;
                }
            }
        }
    }
});